''' NavSquare Program with Functions (part 1) Defining Functions Lesson Sample Solution. Values in functions may be different. ''' from botcore import * from time import sleep motors.enable(True) def go_straight(): motors.run(LEFT, 30) motors.run(RIGHT, 30) sleep(2.0) def turn_90(): motors.run(LEFT, 20) motors.run(RIGHT, -20) sleep(0.72) # -- Main Program -- # first side go_straight() turn_90() # second side go_straight() turn_90() # third side go_straight() turn_90() # fourth side go_straight() turn_90()